<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<style>
form {border:1px solid #D9E4EA; margin:auto; margin-bottom:10px; padding:2px; width:99%;}
form table {background:#FFFFFF; border-bottom:10px solid #FFFFFF; border-top:10px solid #FFFFFF; width:99%;}
form table td {padding:4px 0 4px 8px; border-bottom:1px solid #EEEEEE;}
form table th {background:#e2e9ea; padding:5px 0 5px 0;}
</style>
<form name="theForm" method="post" action="index.php?m=ushop&c=orders&a=look_back_sale&menuid=<?php echo $_GET['menuid'];?>">
    <div style="margin-bottom: 5px" class="list-div">
        <table width="100%" cellspacing="1" cellpadding="3">
            <tbody>
	            <tr>
                    <th colspan="4">基本信息</th>
                </tr>
                <tr>
                    <td width="18%"><div align="right"><strong>退贷时间：</strong></div></td>
                    <td width="34%"><?php echo date('Y-m-d H:m:s',$info['back_time']); ?></td>
                    <td width="15%"><div align="right"><strong>发货时间：</strong></div></td>
                    <td><?php if($info['confirm_time']==0 || empty($info['confirm_time'])) {echo '未发贷';}else{echo date('Y-m-d H:m:s',$info['confirm_time']);} ?></td>
                </tr>
                <tr>
                    <td><div align="right"><strong>下单时间：</strong></div></td>
                    <td><?php echo date('Y-m-d H:m:s',$info['shipping_time']); ?></td>
                    <td><div align="right"><strong>订单号：</strong></div></td>
                    <td><?php echo $info['order_sn'];?></td>
                </tr>
                <tr>
                    <td><div align="right"><strong>购贷人：</strong></div></td>
                    <td><?php echo $info['user_name']; ?></td>
                    <td><div align="right"><strong>配送费用：</strong></div></td>
                    <td>￥<?php echo $info['freight']; ?>元</td>
                </tr>
                <tr>
                    <th colspan="4">收货人信息</th>
                </tr>
                <tr>
                    <td><div align="right"><strong>收货人：</strong></div></td>
                    <td><?php echo $addressinfo['consignee_name'] ?></td>
                    <td><div align="right"><strong>电子邮件：</strong></div></td>
                    <td><?php echo $addressinfo['consignee_email'] ?></td>
                </tr>
                <tr>
                    <td><div align="right"><strong>地址：</strong></div></td>
                    <td><?php echo $addressinfo['consignee_more_address'] ?></td>
                    <td><div align="right"><strong>邮编：</strong></div></td>
                    <td><?php echo $addressinfo['consignee_zip'] ?></td>
                </tr>
                <tr>
                    <td><div align="right"><strong>电话：</strong></div></td>
                    <td><?php echo $addressinfo['consignee_tel'] ?></td>
                    <td><div align="right"><strong>手机：</strong></div></td>
                    <td><?php echo $addressinfo['consignee_pho'] ?></td>
                </tr>
                <tr>
                    <td><div align="right"><strong>退贷原因：</strong></div></td>
                    <td colspan="3"><?php echo $info['back_cause'] ?></td>
                </tr>
            </tbody>
        </table>
    </div>
    <div style="margin-bottom: 5px" class="list-div">
        <table width="100%" cellspacing="1" cellpadding="3">
            <tbody>
                <tr>
                    <th scope="col" colspan="8">商品信息</th>
                </tr>
                <tr>
                    <td scope="col"><div align="center"><strong>商品名称 [ 品牌 ]</strong></div></td>
                    <td scope="col"><div align="center"><strong>价格</strong></div></td>
                    <td scope="col"><div align="center"><strong>数量</strong></div></td>
                    <td scope="col"><div align="center"><strong>小计</strong></div></td>
                </tr>
                <?php 
					foreach($goodsinfo as $value) {
				?>
                <tr>
                    <td align="center"><?php echo $value['title'] ?></td>
                    <td align="center"><div align="right">￥<?php echo $value['price'] ?>元</div></td>
                    <td align="center"><div align="right"><?php echo $value['number'] ?></div></td>
                    <td align="center"><div align="right">￥<?php echo $value['price']*$value['number']; ?>元</div></td>
                </tr>
                <?php
					}
				?>
            </tbody>
        </table>
    </div>
    <div style="margin-bottom: 5px" class="list-div">
        <table width="100%" cellspacing="1" cellpadding="3">
            <tbody>
                <tr>
                    <th>费用信息</th>
                </tr>
                <tr>
                	<td style="text-align:right">商品金额：<strong><?php echo $info['goods_amount']; ?>元</strong> + 运费：<strong><?php echo $info['freight']; ?>元</strong>  - 返现：<strong><?php echo $info['backPrice']; ?>元</strong> - 会员优惠价：<strong> <?php echo $info['memberPrice']; ?>元</strong><br /></td>
                </tr>
                <tr>
                    <td style="text-align:right">- 折上折价：<strong><?php echo $info['discountPrice']; ?>元</strong> - 商品红包：<strong><?php echo $info['bonus_money']; ?>元</strong><br /></td>
                </tr>
                <tr>
                    <td style="text-align:right">- 用户红包：<strong><?php echo $info['member_bonus_money']; ?>元</strong> - 订单下线红包：<strong><?php echo $info['order_amount_bonus_money']; ?>元</strong></td>
                </tr>
                <tr>
                    <td style="text-align:right">= <strong><?php echo $info['theTotalAmount']; ?>元</strong></td>
                </tr>
                <tr>
                    <td style="text-align:right"><font style="font-weight:bold">合计：</font><strong style="color:red"><?php echo $info['theTotalAmount']; ?>元</strong></td>
                </tr>
            </tbody>
        </table>
    </div>
    <div style="margin-bottom: 5px" class="list-div">
        <table width="100%" cellspacing="1" cellpadding="3">
            <tbody>
                <tr>
                    <th>处理状态</th>
                </tr>
                <tr>
                	<td align="center">处理状态：
                    <input type="radio" name="status" value="0" id="status0" <?php if($info['back_status'] == 0) {echo "checked='checked'";}?>  /><label for="status0">不同意</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="radio" name="status" value="1" id="status1" <?php if($info['back_status'] == 1) {echo "checked='checked'";}?>/><label for="status1">同意</label>
                   	<input type="hidden" name="order_id" value="<?php echo $info['order_id']; ?>" />
                    </td>
                </tr>
                <tr>
                    <td align="center"><input type="submit" name="dosubmit" id="dosubmit" class="button" value="确定" /></td>
                </tr>
            </tbody>
        </table>
    </div>
</form>
</body>
</html>